HealthHeartbeatSeriesSample PRO
The HealthHeartbeatSeriesSample class provides an interface for accessing heartbeat series samples, representing a series of individual heartbeat intervals recorded over time. These samples are typically used for analyzing heart rhythm and detecting irregularities such as atrial fibrillation.
This class is returned by the public API method Health.queryHeartbeatSeriesSamples().
Use Cases
- Monitoring heart rhythm during workouts or recovery
- Analyzing irregular heartbeats
- Studying heart behavior during sleep or rest
- Generating datasets for research or diagnostics
Class: HealthHeartbeatSeriesSample
Properties
Note: This class currently does not expose individual RR intervals. It represents only the series summary.
Method: Health.queryHeartbeatSeriesSamples(options?)
Definition
Parameters
startDate(optional): Only return samples on or after this date.endDate(optional): Only return samples on or before this date.limit(optional): Maximum number of samples to return.strictStartDate(optional): If true, only include samples whosestartDateequalsstartDate.strictEndDate(optional): If true, only include samples whoseendDateequalsendDate.sortDescriptors(optional): Sort results bystartDate,endDate, orcount, in forward or reverse order.requestPermissions(optional): An array of health quantity types for which to request permissions before querying. You must request permissions for the types you want to query. Default only requests permissions for theheartbeat,heartRateVariabilitySDNNandheartRatetypes.
Returns
A Promise resolving to an array of HealthHeartbeatSeriesSample instances, sorted according to the provided descriptors.
Example
Notes
- If no permission is granted to access heartbeat data, the returned array will be empty.
- Heartbeat series are most commonly recorded by Apple Watch and represent detailed rhythm data over short durations.
